home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Information / WebSites / Wirenet / files / Dashboard2.lha / Dashboard2 / AmiTCP / bin / StopNet < prev    next >
Text File  |  1998-03-27  |  820b  |  39 lines

  1. /*
  2. $VER: StopNet 2.0 (26.3.98)
  3. by Neil Bothwick
  4. */
  5.  
  6. address command
  7. loopcount = 6
  8. cr = '0a'x
  9.  
  10. /* Exit if no stack running */
  11. if ~(show(P,'AMITCP') | show(P,'MIAMI.1')) then exit
  12.  
  13. /* Warn if online */
  14. 'CheckOnline >NIL:'
  15. if RC = 0 then do
  16.     if rtezrequest('This will disconnect you!'cr'Are you sure?','_Yes |_No','Quit','rt_reqpos = reqpos_centerscr') = 0 then exit 5
  17.     else 'Disconnect'
  18.     end
  19.  
  20. if exists('Wirenet:UserScripts/Stopnet') > 0 then 'Wirenet:UserScripts/Stopnet'
  21.  
  22. do while loopcount > 0 & show(ports,'MIAMI.1') > 0
  23.     address 'MIAMI.1' 'QUIT'
  24.     loopcount = loopcount - 1
  25.     'wait 2'
  26.     end
  27.  
  28. do while loopcount > 0 & show(ports,'AMITCP') > 0
  29.     address 'AMITCP' 'KILL'
  30.     loopcount = loopcount - 1
  31.     'wait 2'
  32.     end
  33.  
  34. 'Wirenet:bin/WirenetPrefs FLUSH'
  35. 'FlushLibs >NIL:'
  36. 'SetEnv NetState NoNet'
  37.  
  38.  
  39.